keep (one's) wits about (someone)

Translations
rester sur ses gardes
Definitions
To remain alert, attentive, and able to think clearly in a difficult or dangerous situation.